<template>
<div>
<aa></aa>
<div style='width:auto;margin:0 auto;position: relative;background-color:#f2f2f2'>
<el-carousel indicator-position="none" class='lunbo' :interval='1500'>
    <el-carousel-item v-for="item in 4" :key="item">
  <div style="background-image: url('/img/bunbo.jpg');height:500px;background-repeat: no-repeat; background-position: center;"> </div>
    </el-carousel-item>
  </el-carousel>
 <div style='border-radius: 8px;
    position: absolute; top: 390px;
    left: 50%;
    z-index: 999;
    width: 918px;
    margin: 0px auto 0px -459px;
    padding: 12px 0px;
    background-color: rgba(0, 0, 0, 0.4);
    height: 66px;'>
    <div style='height:100%;margin: 0px 10px;background-color: white;'>
    <span style='float: left;
    width: 110px; position: relative;
    height: 35px;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    margin: 16px 0;
    font-size: 18px;
    border-right: 2px solid #d3d3d3;' @click='schoose'>{{xz==0?'全部':xz==1?'整租':'合租'}}<div :style="{position:'absolute',bottom:'-147px','background-color':'white','border':'1px solid #cccccc','width':'110px',display:(schoos?'block':'none')}">
    <ul class='syxian' style='list-style:none' @click='hvae'><li>全部</li><li>整租</li><li>合租</li></ul>
    </div></span>
    <input placeholder='请输入区域、地铁、小区名' type='text' style='float: left;
    height: 66px;
    border: 0;
        width: 630px;
    text-indent: 20px;
    font-size: 20px;
    outline: none;' />
    <a style='text-align: center;
    width: 140px;
    float: right;
    height: 66px;
    line-height: 66px;
    background-color: #ee3843;
    color: white;
    text-indent: 0px;font-size:18px' @click='mhcx'>搜索</a>
    </div>
    </div>
  </div>
  <div class='shouye'>
  <div>
  <router-link :to="{name:'search',query:{type:1}}" style='height: 100%;
    display: inline-block;margin: 0px 49px;color:black;text-decoration: none;'>
  <img src='/img/icon1.png'>
  <h3 style='text-align:center;font-weight:300'>合租</h3>
  </router-link>
  <router-link :to="{name:'search',query:{type:0}}" style='height: 100%;
    display: inline-block;margin: 0px 49px;color:black;text-decoration:none;'>
  <img src='/img/icon2.png'>
  <h3 style='text-align:center;font-weight:300;'>整租</h3>
  </router-link>
  <a style='height: 100%;
    display: inline-block;margin: 0px 49px;'>
  <img src='/img/icon3.png'>
  <h3 style='text-align:center;font-weight:300'>品质公寓</h3>
  </a>
  <a style='height: 100%;
    display: inline-block;margin: 0px 49px;'>
  <img src='/img/icon4.png'>
  <h3 style='text-align:center;font-weight:300'>地图找房</h3>
  </a>
  </div>
  </div>
<div class='sy'>
  <div>
  <ul>
  <li>
  <img src='/img/tuzi2018.png' >
  <span style=''>
  <img src='/img/icon5.png' >
    <div >
    <p style='font-weight: bold;font-size: 30px;color:#eb6c6c'>快乐合租</p>
    <p >百万兔宝儿的快乐合租公寓</p>
    </div>
    </span>
    <div style='margin-top: 127px;float: right;'>
     <router-link to="/search">
    <img src='/img/morer.png' style='width:90px'>
    </router-link>
    </div>
  </li>
  <li style='border-bottom: 5px solid rgb(57, 183, 175);'>
  <img src='/img/tuzi2018.png'>
  <span >
  <img src='/img/icon6.png' >
    <div>
    <p style='font-weight: bold;font-size: 30px;color:#398eca'>轻松整租</p>
    <p >整套出租的单身公寓</p>
    </div>
    </span>
    <div style='margin-top: 127px;float: right;'>
        <router-link to="/search">
    <img src='/img/moreg.png' style='width:90px'>
        </router-link>
    </div>
  </li>
  <li style='border-bottom: 5px solid rgb(57, 142, 202);'>
  <img src='/img/tuzi2018.png'>
  <span >
  <img src='/img/icon7.png'>
    <div>
    <p style='font-weight: bold;font-size: 30px;color:#398eca'>品质公寓</p>
    <p >高品质的独栋青年公寓</p>
    </div>
    </span>
    <div style='margin-top: 127px;float: right;'>
        <router-link to="/search">
    <img src='/img/moreb.png' style='width:90px'>
        </router-link>
    </div>
  </li>
  </ul>
  </div>
  </div>
  <div style='background-color:#f2f2f2;padding: 30px 0;'>
  <div style='margin:0 auto;width:1190px'>
  <ul class='info'>
  <li>
    <div>
    <router-link to='/'><img src='http://cdn.baletoo.cn/Uploads/housephoto/6157/6156603/oss_5db2819ca38d0.jpg@!380_280.png'></router-link>
     <div>
     <div>
     <router-link to="">名京九合院精品单身公寓</router-link>
     <span>1231元</span>
     </div>
     <div>未央-方新村公寓 | 1室0厅1卫 | 18M²</div>
      <div>
      <span>新上架</span>
      <span>近地铁</span>
      <span>主卧</span>
      <span>电梯房</span>
      </div>
     </div>
    </div>
   
  </li>
  <li>
    <div>
    <router-link to='/'><img src='http://cdn.baletoo.cn/Uploads/housephoto/2439/2438051/oss_5acc2fa9a3e4e.png@!380_280.png'></router-link>
     <div>
     <div>
     <router-link to="">格子公寓</router-link>
     <span>1000元</span>
     </div>
     <div>未央-方新村公寓 | 1室0厅1卫 | 25M²</div>
      <div>
      <span>新上架</span>
      <span>近地铁</span>
      <span>独立厨房</span>
      </div>
     </div>
    </div>
   
  </li>
  <li>
    <div>
    <router-link to='/'><img src='http://cdn.baletoo.cn/Uploads/housephoto/2402/2401808/oss_5acc2f5e367c0.png@!380_280.png'></router-link>
     <div>
     <div>
     <span>怡家公寓</span>
     <span>900元</span>
     </div>
     <div>碑林-南稍门公寓 | 1室0厅1卫 | 20M²</div>
      <div>
      <span>新上架</span>
      <span>近地铁</span>
      <span>主卧</span>
      </div>
     </div>
    </div>
   
  </li>
  <li>
    <div>
    <router-link to='/'><img src='http://cdn.baletoo.cn/Uploads/housephoto/2181/2180164/oss_5aab69a8c6a70.jpg@!380_280.png'></router-link>
     <div>
     <div>
     <span>好客来恒涛酒店公寓</span>
     <span>1500元</span>
     </div>
     <div>雁塔-曲江大道公寓 | 1室0厅1卫 | 30M²</div>
      <div>
      <span>近地铁</span>
      <span>主卧</span>
      </div>
     </div>
    </div>
   
  </li>
  </ul>
  </div>
  </div>
 <my-footer></my-footer> 
</div>
</template>
<script>
import aa from '../components/OtherHeader.vue'
import MyFooter from '../components/MyFooter.vue'
import {mapState,mapMutations} from 'vuex'

export default {
    data(){
        return{
            schoos:false,
            xz:0,
        }
    },
    component:{
        ...mapState(['cid','city'])
    },
    methods: {
        schoose(e){
            if(e.target.nodeName=='SPAN'){this.schoos =!this.schoos;}
        },
        hvae(e){
           if(e.target.nodeName=='LI'){
               var str = e.target.innerText
              this.xz = str=='全部'?0:str=='整租'?1:2
              this.schoos=false;
           }
        },
        mhcx(){
         
        }
    },
    mounted() {
     console.log('加载了溢出')
    },
    beforeRouteLeave(to,from,next){
        console.log('离开');
        console.log(to,from)
        next()
    },
    beforeRouteEnter(to,from,next) {
       console.log('进入');next()}
}
</script>
<style>
.info{
    list-style:none;
    width:1224px
}
.syxian>li{
    margin:10px;
    line-height:30px;
    height:30px;
    font-size:14px
}
.syxian>li:hover{
    background-color:#f2f2f2
}
.info>li{
    float:left
}
.info>li>div{
    background-color: #fff;
    float: left;
    border-radius: 4px;
    width: 272px;
    margin-right: 34px;
}
.info>li>div:hover{
    box-shadow: 0px 0px 8px 0px grey;
    cursor: pointer;
}
.info>li>div>div{
    padding:10px
}
.info>li>div>div>div:nth-child(1)>span:first-child{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 170px;
    font-size: 18px;
    height: 26px;
    line-height: 26px;
    display: inline-block;
}
.info>li>div>div>div:nth-child(1)>span:last-child{
    
    font-size:20px;
    display:inline-block;
    width:80px;
     overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color:#ee3843;
    text-align:right
}
.info>li>div>div>div:nth-child(1){
    font-size:0
}
.info>li>div>div>div:nth-child(2){
margin-top:5px;
 font-size:14px
}
.info>li>div>div>div:nth-child(3){
  margin-top:5px;
 font-size:14px
}
.info>li>div>div>div:nth-child(3)>span:first-child{
    background-color: #ffeaea;
    color: #f7646e;
    
}
.info>li>div>div>div:nth-child(3)>span{
    background-color: #eff6fa;
    color: #379ac7;
    display:inline-block;
    margin-right:10px;
    padding:0 5px;
        border-radius: 2px;
}
.info>li>div>a{
    width: 272px;
    height: 186px;
    display: block;
}
.info>li>div>a>img{
    width:100%;
    height:100%;
    border-radius: 4px 4px 0 0;
}
.info::after{
    content: '';
    display: block;
    clear: both;
}
  .el-carousel__item h3 {
    color: #475669;
    font-size: 18px;
    opacity: 0.75;
    margin: 0;
    height:500px;
  }
  .lunbo{
    position: relative;
    width:100%;
    margin:0 auto;
  }
  .lunbo .el-carousel__container{
      height:500px
  }
  .sy{
      background-color:#f2f2f2;
      margin-top:30px
  }
  .sy>div{
      width:1190px;
      margin:0 auto;
  }
  .sy div a {
      height: 100%;
    display: inline-block;
    margin: 0px 49px;
  }
  .pageLink{
    padding: 50px 0 0 0;
    height: 318px;
}
.pageLink a{
     text-decoration: none;
    color: #fff;
}
.clearfix:after{
    clear: both;
}
.pageLink .out{
    margin: 0 auto;
    
}
.pageLink-unit{
    float: left;
    width: 25%;
    text-align: center;
    overflow: hidden;
    margin: 0 auto;
}
.pageLink-unit a{ position: relative; }
.pageLink-pic-zu{
    background-position: 0 0;  
} 
.pageLink-pic-yf {
    background-position: 0 -240px;
}
.pageLink-pic-dt{
    background-position: 0 -480px;
}
.pageLink-pic-zz {
    background-position: 0 -720px;
}
.pageLink-pic{
        width: 240px;
        display: block;
        margin-right: 0;
        z-index: 99;
}

/* a:any-link{
    color: link;
    cursor: pointer;
} */
.pageLink-pic>img{
    z-index: 999;
    width: 176px;
    position: relative;
}
img{
    border: none 0;
    vertical-align: middle;
}
.pageLink-unit .pageLink-unit-word{
    color: black;
    font-size: 28px;
    width: 240px;
    margin-top: 20px;
    margin-bottom: 30px;
}
.pageLink-pic .circle{
    position: absolute;
    top: 0;
    left: 32px;
    width: 172px;
    height: 172px;
    border-radius: 50%;
}
.circle-red {
    border: rgb(235,108,108) 2px solid;
}
.circle-green{
    border: rgb(57,183,175) 2px solid;
}
.circle-blue{
    border: rgb(57,142,202) 2px solid;
}
.circle-yellow{
    border: rgb(247,189,71) 2px solid;
}
    .sy>div>ul{
        list-style:none;
 
    }
    .sy>div>ul>li{
        height:160px;
        border-bottom: 5px solid rgb(235, 108, 108);
        padding-top:60px
    }
    .sy>div>ul>li>img{
width:100px;margin-top: 58px;
    }
    .sy>div>ul>li>span{
height: auto;width: 773px;display: inline-block;
    }
    .sy>div>ul>li>span>img{
        margin-left: 347px;width: 114px;height: 114px;margin-bottom: 46px;
    }
    .sy>div>ul>li>span>div{
        width: 270px;margin-top: 35px;float: right;
    }
    .sy>div>ul>li>span>div:last-child{
        font-size: 18px;padding-top: 15px;color:#5a5c5d
    }
  .shouye{
      background-color:white;
      margin-top:30px
  }
   .shouye>div{
       width:1190px;
      margin:0 auto;
   }
</style>